package edu.citadel.domain;

import edu.citadel.db.PaymentDao;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;

import java.util.Date;

/**
 * User: jordan
 * Date: 3/10/13
 * Time: 1:47 PM
 */
@Configurable(autowire = Autowire.BY_TYPE)
public class Payment {
    @Autowired
    private PaymentDao paymentDao;
    private double amount;
    private Date paymentDate;
    private int workItemId;
    private int paymentId;


    public Payment() {}

    public Payment(int workItemId) {
        this.workItemId = workItemId;
    }


    public void save() {
        paymentDao.save(this);
    }

    public int getPaymentId() {
        return paymentId;
    }

    public void setPaymentId(int paymentId) {
        this.paymentId = paymentId;
    }

    public int getWorkItemId() {
        return workItemId;
    }

    public void setWorkItemId(int workItemId) {
        this.workItemId = workItemId;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public Date getPaymentDate() {
        return paymentDate;
    }

    public void setPaymentDate(Date paymentDate) {
        this.paymentDate = paymentDate;
    }

    public void setPaymentDao(PaymentDao paymentDao) {
        this.paymentDao = paymentDao;
    }
}

